<?php

namespace app\model\not_del;

use think\Model;
use think\model\relation\BelongsTo;

/**
 * 因子解释表
 */
class RatingScaleFactorLevelModel extends Model
{
    protected $name = 'rating_scale_factor_level';

    /**
     * 关联因子名
     * @return BelongsTo
     */
    public function factorName(): BelongsTo
    {
        return $this->belongsTo(RatingScaleFactorModel::class, 'factor_id')->bind(['factor_name' => 'name','warning_method']);
    }

    /**
     * 关联因子表-是否为总分
     * @return BelongsTo
     */
    public function isTotal(): BelongsTo
    {
        return $this->belongsTo(RatingScaleFactorModel::class,'factor_id')->bind(['is_total']);
    }

}